import java.util.Random;

/**
 * Created by dllo on 18/4/2.
 */
public class Question02 {
    public static void main(String[] args) {
        Random random = new Random();
        int[] arr = new int[20];
        int j = -1;
        int[] arr1 = new int[20];

        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(20);
            System.out.print(arr[i] + " ");
            if (arr[i] > 10) {
                j++;
                arr1[j] = arr[i];
            }
        }
        int sum = j + 1;
        System.out.println("大于10的个数为" + sum);

        for (j = 0; j < sum; j++) {
            System.out.println(arr1[j]);
        }
    }
}
